import { Directive, EventEmitter, Input, Output } from "@angular/core";

@Directive()
export class CustomProps {
  @Input() type = 'text';
  @Input() model = '';
  @Input() placeholder = '';
  @Input() value: string = '';
  @Input() disabled: boolean = false;
  @Input() maxlength:number;
  @Input() minlength:number;

  @Input('auto-complete') autoComplete: string = 'off'     // only type === 'text'
  @Input() name: string
  @Input('native-type') nativeType: string = 'text'
  @Input() readonly: boolean = false
  @Input() autofocus: boolean = false
  @Input('class') parentClass: string = ''

  @Output() modelChange: EventEmitter<string> = new EventEmitter();
  @Output() focus: EventEmitter<any> = new EventEmitter();
  @Output() blur: EventEmitter<any> = new EventEmitter();
}